<!doctype html>
<html>
<head>
    <meta charset="utf-8"/>
</head>
<body>
<div tabindex="0" style="border: 1px solid red;" id="d">
    hahaa
</div>
<script>
    document.getElementById('d').style.OUserSelect =
            document.getElementById('d').style.MsUserSelect = 'none'
</script>
</body>
</html>